#!/usr/bin/env python3
# coding=utf-8
from utils.selenium_util import WebdriverAction


class SearchPage:
    keyword_input = "id=>kw"
    search_btn = "id=>su"

    def __init__(self, driver):
        self.action = WebdriverAction(driver)

    def search_keyword(self, kw):
        self.action.get_url("http://www.baidu.com")
        self.action.input_text(SearchPage.keyword_input, kw)
        self.action.click_element(SearchPage.search_btn)
